using System;
using NUnit.Framework;
using QuickTest.Core.Compilation;

namespace QuickTest.Tests.Core.Compilation
{
    [TestFixture]
    public class ProjectTests
    {
        [Test]
        public void FilePath_Factory_Method_Should_Create_With_Uri()
        {
            var fileUri = new FileUri(MSBuildCompilerTests.CompilationProjectFilePath);
            Project project = Project.Create(fileUri);

            FileUri projectFileUri = project.FileUri;

            Assert.That(ReferenceEquals(projectFileUri, fileUri), "Uri should have been correctly initialised");
        }

        [Test]
        public void ArgumentNullException_Thrown_If_Created_With_Null_FileUri()
        {
            TestUtils.AssertThrows<ArgumentNullException>(() => Project.Create(null), "ArgumentNullException should have been thrown.");
        }
    }
}